<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-u1OknCvxWvY5kfmNBILK2hRnQC3Pr17a+RTT6rIHI7NnikvbZlHgTPOOmMi466C8" crossorigin="anonymous"></script>
    <style>
        /* CDN 服务仅供平台体验和调试使用，平台不承诺服务的稳定性，企业客户需下载字体包自行发布使用并做好备份。 */
@font-face {
  font-family: 'iconfont';  /* Project id 3656739 */
  src: url('//at.alicdn.com/t/c/font_3656739_fkwztq7t0q8.woff2?t=1663569629773') format('woff2'),
       url('//at.alicdn.com/t/c/font_3656739_fkwztq7t0q8.woff?t=1663569629773') format('woff'),
       url('//at.alicdn.com/t/c/font_3656739_fkwztq7t0q8.ttf?t=1663569629773') format('truetype');
}
        *{
            margin: 0;
            padding: 0;
            list-style: none;
            font-size: 16px;
           
        }
        .s{
            font-family: 'iconfont';
           font-size: 35px;
           cursor: pointer !important;
        }
       .box{
        display: flex;
        justify-content: space-between;
        background-color: rgb(0, 35, 87);
        color: white;
       
       }
       .boxleft{
        width: 200px;
       line-height: 60px;
       height: 60px;
        display: flex;
        justify-content: center;
        align-items: center;
      
       }
       .boxright{
        display: flex;
        line-height: 60px;
       height: 60px;
        justify-content: center;
        align-items: center;
       }
       .conten{
        width: 200px;
        display: flex;
        justify-content: space-between;
       }
       a{
        text-decoration: none;
        color: white;
       }
    </style>
</head>
<body>
    <div class="container-xxxl">
        <div class="box">
          <div class="boxleft">
              <h1>惠光健康</h1>
          </div>
          <div class="boxright">
          

          <div class="conten">
           <span class="username">用户:  <%=username%></span>
            <a href="/index/exit">退出</a>
            <b class="s">&#xeb11;</b>
          </div>
          </div>
        </div>
      
    </div>
    <script>
        //定义一个变量进行判断，默认false 非全屏状态
var exitFullscreen = false
// 全屏事件
let tuichu=document.querySelector('.s');
function handleFullScreen() {
var element = document.documentElement;
if (exitFullscreen) {
if (document.exitFullscreen) {
 document.exitFullscreen();
} else if (document.webkitCancelFullScreen) {
 document.webkitCancelFullScreen();
} else if (document.mozCancelFullScreen) {
 document.mozCancelFullScreen();
} else if (document.msExitFullscreen) {
 document.msExitFullscreen();
}
exitFullscreen = false
} else {
if (element.requestFullscreen) {
 element.requestFullscreen();
} else if (element.webkitRequestFullScreen) {
 element.webkitRequestFullScreen();
} else if (element.mozRequestFullScreen) {
 element.mozRequestFullScreen();
} else if (element.msRequestFullscreen) {
 // IE11
 element.msRequestFullscreen();
}
exitFullscreen = true
}
}
tuichu.onclick=function(){
    handleFullScreen();
}
    </script>
</body>
</html>